<template>
  <div>
     <ul>
        <li><router-link to="/co/all-0">All_contacts</router-link></li>
        <li><router-link to="/co/all-1">Alice</router-link></li>
        <li><router-link to="/co/all-2">Bob</router-link></li>
     </ul>
     <button @click="fn">随机演示</button>
     <router-view></router-view>
   </div>
</template>
 
<script>
export default {
  name: "ContactsA",
  components: {},
  props: {},
  data() {
    return {};
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    fn() {
      this.$router.push(`/co/all-${Math.floor(Math.random()*(3))}`)
    }
  }
};
</script>

<style scoped>
     .router-link-active {
      color: red;
     }
</style>